package DS0419;

public class Student {
    String name;
    String sex;

    public Student(String name,String sex){
        this.name = name;
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "学生名字叫"+name+"，性别为"+sex;
    }

    public String getSex() {
        return sex;
    }

    @Override
    public boolean equals(Object obj) {
        Student student = (Student) obj;
        return this.name.equals(student.name);
    }
}
